POV-Ray : Newsgroups : povray.general : Trouble with a torus : Re: Trouble with a torus Server Time
6 Aug 2024 17:00:00 EDT (-0400)
  Re: Trouble with a torus  
From: Rune
Date: 14 Feb 2002 19:32:25
Message: <3c6c5719@news.povray.org>
"Shay" wrote:
> Please save my sanity!!!

background {rgb 1}
camera {location <1,2,-2> look_at 0}
light_source {<-600, 400, -400> color rgb 1}

#declare TorusMinor = .05;
#declare SphereRad  = 1.0;
#declare Height     = .5;

#declare Angle = asin(Height/SphereRad);
#declare TorusMajor  = (SphereRad-TorusMinor)*cos(Angle);
#declare TorusHeight = (SphereRad-TorusMinor)*sin(Angle);

intersection {
 sphere {0, SphereRad}
 plane {y*1, Height}
 pigment {rgb 1}}

torus {TorusMajor, TorusMinor sturm translate y*TorusHeight pigment {rgb 1}}

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Jan 20)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.